home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
gnu
/
objcissu.lha
/
multiple-threads
< prev
next >
Wrap
Internet Message Format
|
1993-03-01
|
4KB
Date: Thu, 10 Sep 1992 15:12:40 -0700
From: Bruce Nilo <bruce@ictv.com>
To: gnu-objc@prep.ai.mit.edu
Subject: Re: Your mission, should you choose to accept it. . .
[moved PROTOCOL IMPROVEMENT]
[moved ERROR HANDLING]
BETTER RUNTIME SUPPORT FOR MULTI-THREADED PROGRAMS
Practically every program I have written on the NeXT has either been
explicitly or implicitly multi-threaded. Any OS which supports
multi-tasking within the same address space should at least attempt to
support a runtime system which does not penalize the use of multiple
threads. Even if this cannot be done transparently, low level runtime
calls could be made to set up private thread caches etc. Using a
hammer to provide thread safety, such as providing a semaphore on a
global cache, should be used only if it is reasonably certain that
this approach has message dispatching performance competitive with
other implementations.
Perhaps NeXT's approach is a near optimal solution. I find this hard
to believe however, and suspect that in reality not much thought has
been given to the problem.
[moved GENERAL DATA STRUCTURES]
- Bruce D. Nilo
VP Software Systems
ICTV
Date: Mon, 12 Oct 1992 13:46:03 -0500
To: gnu-objc@prep.ai.mit.edu
From: bradcox@sitevax.gmu.edu (Brad Cox)
Subject: Action Expressions (exception handling, multitasking)
Cc: Bruce Nilo <bruce@ictv.com>
In Re: Your mission, should you choose to accept it. . Bruce Nilo
<bruce@ictv.com> writes
NeXT has half heartedly implemented an "Exception Handling" facility.
It basically consists of some macros, and the use of setjmp() and
longjmp(). An error handling facility should be specified,
implemented, and adhered to throughout the runtime system.
I agree wholeheartedly! I joined this list primarily to encourage
extensions to Objective-C of precisely this nature.
I made substantial progress on the run-time part of this problem at Stepstone
several years ago, but never managed to complete the language extensions
(upwards compatible) to make them broadly useful.
<Taskmaster Document> "Action expressions in Objective-C are similar to
block expressions in Smalltalk, with differences to adapt to the
constraints of stack-based languages like C. Action expressions are a way
to express actions, or deferred computations; computations to be written at
one place but invoked from another."
This document, which describes the (implemented) runtime components and
(unimplemented) syntactic extensions, would be useful in considering
language and/or runtime extensions.
I'll be glad to email a copy to those planning to work on such extentions.
(Please...only if you're planning to do actual work!)
===
Brad Cox, Ph.D; Program on Social and Organizational Learning; George Mason
University; Fairfax VA 22030; 703 691 3187 direct; 703 993 1142 reception;
bradcox@sitevax.gmu.edu
---
Information Age Consulting; 13668 Bent Tree Circle #203; Centreville VA
22020; 703 968 8229 home; 703 968 8798 fax; bradcox@infoage.com
Date: Thu, 15 Oct 92 04:59:00 -0400
From: rms@gnu.ai.mit.edu (Richard Stallman)
To: gsk@marble.com
Cc: gnu-objc@prep.ai.mit.edu
Subject: action expressions
GNU C supports nested functions. In 2.3, these should work in
Objective C. This supplies most of the mechanism for creating action
objects if you want them. In fact, I expect one can go the rest of
the way with macros, if you don't mind a different syntax:
#define make_action(name, body)
({ id __temp = <create an empty action object>;
void name () { body }
<store &name into __temp>;
__temp; })
I've omitted the backslashes, and left stubs for where Objective C
constructs are needed since I don't know them.
This technique requires you to give a unique name each time you write
an action expression. That could be avoided with an improvement in
macro power.